﻿using System.Globalization;
using WPFLocalizeExtension.Engine;
using WPFLocalizeExtension.Extensions;

namespace Core.Localization
{
	public class LocalizationManager
	{
		public void SetLocale(CultureInfo culture)
		{
			LocalizeDictionary.Instance.Culture = culture;
		}

		public string Localize(string localizable)
		{
			string localized;
			new LocExtension(localizable).ResolveLocalizedValue(out localized);

			return localized ?? localizable;
		}
	}
}